package com.example.demo.trade.controller;

import java.time.LocalDateTime;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope
@RequestMapping("/trade")
public class TradeController {

    @Value("${web.name}")
    public String name;

    @RequestMapping("/test")
    public String test() {
        System.out.println("name: " + name);
        return "[trade] name: " + name + ", time: " + LocalDateTime.now();
    }

}
